﻿namespace HuaWei.Windows.Forms
{
    using DevExpress.XtraBars;
    using DevExpress.XtraEditors.Controls;
    using DevExpress.XtraEditors.Repository;
    using DevExpress.XtraGrid;
    using DevExpress.XtraGrid.Columns;
    using DevExpress.XtraGrid.Views.Grid;
    using HuaWei.CommClass;
    using HuaWei.CommComp;
    using System;
    using System.ComponentModel;
    using System.Drawing;
    using System.Windows.Forms;

    public class FrmQC : FrmBase
    {
        private Bar bar;
        private Bar bar1;
        private BarButtonItem barButtonItem1;
        private BarButtonItem barButtonItem2;
        private BarDockControl barDockControl;
        private BarDockControl barDockControl1;
        private BarDockControl barDockControl2;
        private BarDockControl barDockControl3;
        private BarManager barManager;
        private BindingSource bindingSource;
        private GridColumn colIsSelect;
        private GridColumn colJSRQ;
        private GridColumn colQC;
        private GridColumn colQCMC;
        private GridColumn colQQRQ;
        private RepositoryItemCheckEdit fAfGsUdEf;
        private GridControl gridControl4;
        private GridView gridView2;
        private IContainer icontainer1 = null;
        private RepositoryItemCheckEdit repositoryItemCheckEdit2;
        private RepositoryItemDateEdit repositoryItemDateEdit1;

        public FrmQC()
        {
            this.InitializeComponent();
        }

        private void barButtonItem1_ItemClick(object sender, ItemClickEventArgs e)
        {
            base.Save();
        }

        private void barButtonItem2_ItemClick(object sender, ItemClickEventArgs e)
        {
            base.DialogResult = System.Windows.Forms.DialogResult.Cancel;
        }

        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.icontainer1 != null))
            {
                this.icontainer1.Dispose();
            }
            base.Dispose(disposing);
        }

        private void euwcnUwWn(object sender, EventArgs e)
        {
            this.LoadData();
        }

        private void InitializeComponent()
        {
            this.icontainer1 = new Container();
            this.bindingSource = new BindingSource(this.icontainer1);
            this.bar = new Bar();
            this.barManager = new BarManager(this.icontainer1);
            this.bar1 = new Bar();
            this.barButtonItem1 = new BarButtonItem();
            this.barButtonItem2 = new BarButtonItem();
            this.barDockControl = new BarDockControl();
            this.barDockControl1 = new BarDockControl();
            this.barDockControl2 = new BarDockControl();
            this.barDockControl3 = new BarDockControl();
            this.gridControl4 = new GridControl();
            this.gridView2 = new GridView();
            this.colIsSelect = new GridColumn();
            this.repositoryItemCheckEdit2 = new RepositoryItemCheckEdit();
            this.colQC = new GridColumn();
            this.colQCMC = new GridColumn();
            this.colQQRQ = new GridColumn();
            this.repositoryItemDateEdit1 = new RepositoryItemDateEdit();
            this.colJSRQ = new GridColumn();
            this.fAfGsUdEf = new RepositoryItemCheckEdit();
            base.ds.BeginInit();
            base.dsQuery.BeginInit();
            ((ISupportInitialize) this.bindingSource).BeginInit();
            this.barManager.BeginInit();
            this.gridControl4.BeginInit();
            this.gridView2.BeginInit();
            this.repositoryItemCheckEdit2.BeginInit();
            this.repositoryItemDateEdit1.BeginInit();
            this.repositoryItemDateEdit1.VistaTimeProperties.BeginInit();
            this.fAfGsUdEf.BeginInit();
            base.SuspendLayout();
            this.bar.BarName = "Main menu";
            this.bar.DockCol = 0;
            this.bar.DockRow = 0;
            this.bar.DockStyle = BarDockStyle.Top;
            this.bar.OptionsBar.MultiLine = true;
            this.bar.OptionsBar.UseWholeRow = true;
            this.bar.Text = "Main menu";
            this.barManager.Bars.AddRange(new Bar[] { this.bar1 });
            this.barManager.DockControls.Add(this.barDockControl);
            this.barManager.DockControls.Add(this.barDockControl1);
            this.barManager.DockControls.Add(this.barDockControl2);
            this.barManager.DockControls.Add(this.barDockControl3);
            this.barManager.Form = this;
            this.barManager.Items.AddRange(new BarItem[] { this.barButtonItem1, this.barButtonItem2 });
            this.barManager.MainMenu = this.bar1;
            this.barManager.MaxItemId = 2;
            this.bar1.BarName = "Main menu";
            this.bar1.DockCol = 0;
            this.bar1.DockRow = 0;
            this.bar1.DockStyle = BarDockStyle.Top;
            this.bar1.LinksPersistInfo.AddRange(new LinkPersistInfo[] { new LinkPersistInfo(this.barButtonItem1), new LinkPersistInfo(this.barButtonItem2) });
            this.bar1.OptionsBar.MultiLine = true;
            this.bar1.OptionsBar.UseWholeRow = true;
            this.bar1.Text = "Main menu";
            this.barButtonItem1.Caption = "保存";
            this.barButtonItem1.Id = 0;
            this.barButtonItem1.Name = "barButtonItem1";
            this.barButtonItem1.ItemClick += new ItemClickEventHandler(this.barButtonItem1_ItemClick);
            this.barButtonItem2.Caption = "取消";
            this.barButtonItem2.Id = 1;
            this.barButtonItem2.Name = "barButtonItem2";
            this.barButtonItem2.ItemClick += new ItemClickEventHandler(this.barButtonItem2_ItemClick);
            this.barDockControl.Dock = DockStyle.Top;
            this.barDockControl.Location = new Point(0, 0);
            this.barDockControl.Size = new Size(0x183, 0x18);
            this.barDockControl1.Dock = DockStyle.Bottom;
            this.barDockControl1.Location = new Point(0, 0x138);
            this.barDockControl1.Size = new Size(0x183, 0);
            this.barDockControl2.Dock = DockStyle.Left;
            this.barDockControl2.Location = new Point(0, 0x18);
            this.barDockControl2.Size = new Size(0, 0x120);
            this.barDockControl3.Dock = DockStyle.Right;
            this.barDockControl3.Location = new Point(0x183, 0x18);
            this.barDockControl3.Size = new Size(0, 0x120);
            this.gridControl4.DataSource = this.bindingSource;
            this.gridControl4.Dock = DockStyle.Fill;
            this.gridControl4.EmbeddedNavigator.Buttons.Edit.Visible = false;
            this.gridControl4.Location = new Point(0, 0x18);
            this.gridControl4.MainView = this.gridView2;
            this.gridControl4.Name = "gridControl4";
            this.gridControl4.RepositoryItems.AddRange(new RepositoryItem[] { this.fAfGsUdEf, this.repositoryItemCheckEdit2, this.repositoryItemDateEdit1 });
            this.gridControl4.Size = new Size(0x183, 0x120);
            this.gridControl4.TabIndex = 0x10;
            this.gridControl4.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { this.gridView2 });
            this.gridView2.Columns.AddRange(new GridColumn[] { this.colIsSelect, this.colQC, this.colQCMC, this.colQQRQ, this.colJSRQ });
            this.gridView2.GridControl = this.gridControl4;
            this.gridView2.Name = "gridView2";
            this.gridView2.OptionsCustomization.AllowFilter = false;
            this.gridView2.OptionsCustomization.AllowGroup = false;
            this.gridView2.OptionsCustomization.AllowSort = false;
            this.gridView2.OptionsNavigation.EnterMoveNextColumn = true;
            this.gridView2.OptionsView.ShowGroupPanel = false;
            this.colIsSelect.Caption = "锁定";
            this.colIsSelect.ColumnEdit = this.repositoryItemCheckEdit2;
            this.colIsSelect.FieldName = "ZT";
            this.colIsSelect.Name = "colIsSelect";
            this.colIsSelect.OptionsColumn.AllowEdit = false;
            this.colIsSelect.Width = 0x24;
            this.repositoryItemCheckEdit2.AutoHeight = false;
            this.repositoryItemCheckEdit2.DisplayValueChecked = "1";
            this.repositoryItemCheckEdit2.DisplayValueUnchecked = "0";
            this.repositoryItemCheckEdit2.Name = "repositoryItemCheckEdit2";
            this.repositoryItemCheckEdit2.ValueChecked = 1;
            this.repositoryItemCheckEdit2.ValueUnchecked = 0;
            this.colQC.Caption = "gridColumn1";
            this.colQC.FieldName = "QCID";
            this.colQC.Name = "colQC";
            this.colQCMC.Caption = "期次";
            this.colQCMC.FieldName = "QCMC";
            this.colQCMC.Name = "colQCMC";
            this.colQCMC.OptionsColumn.AllowEdit = false;
            this.colQCMC.Visible = true;
            this.colQCMC.VisibleIndex = 0;
            this.colQCMC.Width = 0x60;
            this.colQQRQ.Caption = "启起日期";
            this.colQQRQ.ColumnEdit = this.repositoryItemDateEdit1;
            this.colQQRQ.FieldName = "QQRQ";
            this.colQQRQ.Name = "colQQRQ";
            this.colQQRQ.Visible = true;
            this.colQQRQ.VisibleIndex = 1;
            this.colQQRQ.Width = 0x83;
            this.repositoryItemDateEdit1.AutoHeight = false;
            this.repositoryItemDateEdit1.Buttons.AddRange(new EditorButton[] { new EditorButton(ButtonPredefines.Combo) });
            this.repositoryItemDateEdit1.Name = "repositoryItemDateEdit1";
            this.repositoryItemDateEdit1.VistaTimeProperties.Buttons.AddRange(new EditorButton[] { new EditorButton() });
            this.colJSRQ.Caption = "结束日期";
            this.colJSRQ.ColumnEdit = this.repositoryItemDateEdit1;
            this.colJSRQ.FieldName = "JSRQ";
            this.colJSRQ.Name = "colJSRQ";
            this.colJSRQ.Visible = true;
            this.colJSRQ.VisibleIndex = 2;
            this.colJSRQ.Width = 0x8b;
            this.fAfGsUdEf.AutoHeight = false;
            this.fAfGsUdEf.Name = "repositoryItemCheckEdit1";
            this.fAfGsUdEf.NullText = "0";
            base.AutoScaleDimensions = new SizeF(6f, 12f);
            base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            base.ClientSize = new Size(0x183, 0x138);
            base.Controls.Add(this.gridControl4);
            base.Controls.Add(this.barDockControl2);
            base.Controls.Add(this.barDockControl3);
            base.Controls.Add(this.barDockControl1);
            base.Controls.Add(this.barDockControl);
            base.Name = "FrmQC";
            base.StartPosition = FormStartPosition.CenterParent;
            this.Text = "期次选择";
            base.Load += new EventHandler(this.euwcnUwWn);
            base.ds.EndInit();
            base.dsQuery.EndInit();
            ((ISupportInitialize) this.bindingSource).EndInit();
            this.barManager.EndInit();
            this.gridControl4.EndInit();
            this.gridView2.EndInit();
            this.repositoryItemCheckEdit2.EndInit();
            this.repositoryItemDateEdit1.VistaTimeProperties.EndInit();
            this.repositoryItemDateEdit1.EndInit();
            this.fAfGsUdEf.EndInit();
            base.ResumeLayout(false);
        }

        public override void LoadingData()
        {
            base.LoadingData();
            string str = "select * from xmqc where bdid='#bdid#'".Replace("#bdid#", GParams._BDID);
            Class39.smethod4(base.ida, base.ds, str, "XMQC", true);
            this.bindingSource.DataSource = base.ds.Tables["XMQC"];
        }
    }
}

